package com.cjj.dto.resp;

import com.fasterxml.jackson.annotation.JsonSetter;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

@Data
@NoArgsConstructor
@AllArgsConstructor
public class UserListRespDTO {  //用户分页查询返回类

    private String username;

    private String phone;

    private String email;

    private String role;

    private String name;

    private Integer status;

    //private Integer userType;
    // 如果前端传 null，也设置为默认值 1
    @JsonSetter("status")
    public void setStatus(Integer status) {
        this.status = status == null ? 1 : status;
    }
}
